/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author vanessa
 */
@Entity
@Table(name = "tb_cliente")
@NamedQueries({
    @NamedQuery(name = "TbCliente.findAll", query = "SELECT t FROM TbCliente t"),
    @NamedQuery(name = "TbCliente.findByIdCliente", query = "SELECT t FROM TbCliente t WHERE t.idCliente = :idCliente"),
    @NamedQuery(name = "TbCliente.findByNumInscrip", query = "SELECT t FROM TbCliente t WHERE t.numInscrip = :numInscrip"),
    @NamedQuery(name = "TbCliente.findByNroSolicitud", query = "SELECT t FROM TbCliente t WHERE t.nroSolicitud = :nroSolicitud"),
    @NamedQuery(name = "TbCliente.findByNombre", query = "SELECT t FROM TbCliente t WHERE t.nombre = :nombre"),
    @NamedQuery(name = "TbCliente.findByDireccion", query = "SELECT t FROM TbCliente t WHERE t.direccion = :direccion")})
public class TbCliente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_cliente")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer idCliente;
    @Column(name = "num_inscrip")
    private String numInscrip;
    @Column(name = "nro_solicitud")
    private String nroSolicitud;
    @Column(name = "nombre")
    private String nombre;
    @Column(name = "direccion")
    private String direccion;
    @JoinColumn(name = "id_accion", referencedColumnName = "id_accion")
    @ManyToOne
    private TbAccion idAccion;

    public TbCliente() {
    }

    public TbCliente(Integer idCliente) {
        this.idCliente = idCliente;
    }

    public Integer getIdCliente() {
        return idCliente;
    }

    public void setIdCliente(Integer idCliente) {
        this.idCliente = idCliente;
    }

    public String getNumInscrip() {
        return numInscrip;
    }

    public void setNumInscrip(String numInscrip) {
        this.numInscrip = numInscrip;
    }

    public String getNroSolicitud() {
        return nroSolicitud;
    }

    public void setNroSolicitud(String nroSolicitud) {
        this.nroSolicitud = nroSolicitud;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public TbAccion getIdAccion() {
        return idAccion;
    }

    public void setIdAccion(TbAccion idAccion) {
        this.idAccion = idAccion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCliente != null ? idCliente.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbCliente)) {
            return false;
        }
        TbCliente other = (TbCliente) object;
        if ((this.idCliente == null && other.idCliente != null) || (this.idCliente != null && !this.idCliente.equals(other.idCliente))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbCliente[idCliente=" + idCliente + "]";
    }

}
